<template>
  <div>
    <div class="banner" @click="handleBannerClick">
    <img class="banner-img" src="https://img1.qunarzz.com/p/tts8/1702/b1/c5843a7ad86dda02.jpg_r_640x420x90_2722c5f5.jpg" alt="">
    <div class="banner-info">
      <div class="banner-title">
       南京出发-跟团游 ❀
      </div>
      <div class="banner-number banner-icon"><span class="iconfont header-fixed-back">&#xe692;</span>39</div>
    </div>
   </div>
   <fade-animation>
     <common-gallary :imgs="imgs" v-show="showGallary" @close="handleBannerClose"></common-gallary>
   </fade-animation>
  </div>
  
</template>

<script>
import CommonGallary from 'common/gallary/Gallary'
import FadeAnimation from 'common/fade/FadeAnimation'
export default {
  name: 'DetailBanner',
  components:{
    CommonGallary,
    FadeAnimation
  },
  data(){
    return{

    imgs:['https://img1.qunarzz.com/p/tts8/1702/b1/c5843a7ad86dda02.jpg_r_640x420x90_2722c5f5.jpg'],
    showGallary:false
    }
  },
  methods:{
    handleBannerClick(){
      this.showGallary=true;
    },
    handleBannerClose(){
        this.showGallary=false;
    }
  }
  
}
</script>

<style lang="less" scoped>
  .banner{
    overflow:hidden;
    height:0;
    position:relative;
    padding-bottom:55%;
    .banner-img{
      width:100%;
    }
  }
  .banner-info{
    display:flex;
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    color:#fff;
    line-height:0.6rem;
    background-image:linear-gradient(top,rgba(0,0,0,0),rgba(0,0,0,0.8));
    line-height:0.6rem;
    .banner-title{
      flex:1;
      font-size:.32rem;
      padding: 0 0.2rem;
    }
    .banner-number{
      margin-top:0.14rem;
      padding:0 0.4rem;
      line-height:0.32rem;
      height:0.32rem;
      border-radius:0.2rem;
      background:rgba(0,0, 0 ,0.8);
    }
    .banner-icon{
      font-size:0.24rem;
    }
  }
</style>
